/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = '';
  
  checkConfig(config);
  @endpoint = getEndpoint('cd', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model AddProductImageRequest {
  country?: string(name='Country'),
  productId?: string(name='ProductId', description='This parameter is required.', example='productId'),
  productImageList?: [ 
    {
      productImageCutout?: boolean(name='ProductImageCutout', example='true'),
      productImageId?: string(name='ProductImageId', example='productImageId'),
      productImageLabels?: [ string ](name='ProductImageLabels'),
      productImageType?: string(name='ProductImageType', example='horizontal'),
      productImageUrl?: string(name='ProductImageUrl', description='This parameter is required.', example='url'),
    }
  ](name='ProductImageList', description='This parameter is required.'),
  productName?: string(name='ProductName', example='productName'),
}

model AddProductImageShrinkRequest {
  country?: string(name='Country'),
  productId?: string(name='ProductId', description='This parameter is required.', example='productId'),
  productImageListShrink?: string(name='ProductImageList', description='This parameter is required.'),
  productName?: string(name='ProductName', example='productName'),
}

model AddProductImageResponseBody = {
  code?: string(name='Code', example='success'),
  data?: string(name='Data', example='ProductId'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='RequestId'),
  success?: boolean(name='Success', example='true'),
}

model AddProductImageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddProductImageResponseBody(name='body'),
}

/**
 * @summary 添加商品图片属性
 *
 * @param tmpReq AddProductImageRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddProductImageResponse
 */
async function addProductImageWithOptions(tmpReq: AddProductImageRequest, headers: map[string]string, runtime: Util.RuntimeOptions): AddProductImageResponse {
  Util.validateModel(tmpReq);
  var request = new AddProductImageShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.productImageList)) {
    request.productImageListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.productImageList, 'ProductImageList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.productId)) {
    body['ProductId'] = request.productId;
  }
  if (!Util.isUnset(request.productImageListShrink)) {
    body['ProductImageList'] = request.productImageListShrink;
  }
  if (!Util.isUnset(request.productName)) {
    body['ProductName'] = request.productName;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddProductImage',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/AddProductImage`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 添加商品图片属性
 *
 * @param request AddProductImageRequest
 * @return AddProductImageResponse
 */
async function addProductImage(request: AddProductImageRequest): AddProductImageResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return addProductImageWithOptions(request, headers, runtime);
}

model AddShopToGroupRequest {
  country?: string(name='Country'),
  shopGroupId?: string(name='ShopGroupId', description='This parameter is required.', example='ShopGroupId'),
  shopIdList?: [ string ](name='ShopIdList'),
}

model AddShopToGroupShrinkRequest {
  country?: string(name='Country'),
  shopGroupId?: string(name='ShopGroupId', description='This parameter is required.', example='ShopGroupId'),
  shopIdListShrink?: string(name='ShopIdList'),
}

model AddShopToGroupResponseBody = {
  code?: string(name='Code', example='success'),
  data?: string(name='Data', example='ShopGroupId'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='RequestId'),
  success?: boolean(name='Success', example='true'),
}

model AddShopToGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddShopToGroupResponseBody(name='body'),
}

/**
 * @summary 门店组添加门店
 *
 * @param tmpReq AddShopToGroupRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddShopToGroupResponse
 */
async function addShopToGroupWithOptions(tmpReq: AddShopToGroupRequest, headers: map[string]string, runtime: Util.RuntimeOptions): AddShopToGroupResponse {
  Util.validateModel(tmpReq);
  var request = new AddShopToGroupShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.shopIdList)) {
    request.shopIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.shopIdList, 'ShopIdList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.shopGroupId)) {
    body['ShopGroupId'] = request.shopGroupId;
  }
  if (!Util.isUnset(request.shopIdListShrink)) {
    body['ShopIdList'] = request.shopIdListShrink;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddShopToGroup',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/AddShopToGroup`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 门店组添加门店
 *
 * @param request AddShopToGroupRequest
 * @return AddShopToGroupResponse
 */
async function addShopToGroup(request: AddShopToGroupRequest): AddShopToGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return addShopToGroupWithOptions(request, headers, runtime);
}

model AddShopsToGroupRequest {
  shopGroupId?: string(name='ShopGroupId', description='This parameter is required.', example='ShopGroupId'),
  shopIdList?: [ string ](name='ShopIdList', description='This parameter is required.'),
}

model AddShopsToGroupShrinkRequest {
  shopGroupId?: string(name='ShopGroupId', description='This parameter is required.', example='ShopGroupId'),
  shopIdListShrink?: string(name='ShopIdList', description='This parameter is required.'),
}

model AddShopsToGroupResponseBody = {
  code?: string(name='Code', example='success'),
  data?: [ 
    {
      code?: string(name='Code', example='Code'),
      message?: string(name='Message', example='Message'),
      shopId?: string(name='ShopId', example='ShopId'),
    }
  ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='RequestId'),
  success?: boolean(name='Success', example='true'),
}

model AddShopsToGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddShopsToGroupResponseBody(name='body'),
}

/**
 * @summary 门店组添加门店
 *
 * @param tmpReq AddShopsToGroupRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddShopsToGroupResponse
 */
async function addShopsToGroupWithOptions(tmpReq: AddShopsToGroupRequest, headers: map[string]string, runtime: Util.RuntimeOptions): AddShopsToGroupResponse {
  Util.validateModel(tmpReq);
  var request = new AddShopsToGroupShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.shopIdList)) {
    request.shopIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.shopIdList, 'ShopIdList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.shopGroupId)) {
    body['ShopGroupId'] = request.shopGroupId;
  }
  if (!Util.isUnset(request.shopIdListShrink)) {
    body['ShopIdList'] = request.shopIdListShrink;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddShopsToGroup',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/AddShopsToGroup`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 门店组添加门店
 *
 * @param request AddShopsToGroupRequest
 * @return AddShopsToGroupResponse
 */
async function addShopsToGroup(request: AddShopsToGroupRequest): AddShopsToGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return addShopsToGroupWithOptions(request, headers, runtime);
}

model BaiLianSseChatRequest {
  input?: {
    bizParams?: {
      images?: [ 
        {
          type?: string(name='Type'),
          value?: string(name='Value'),
        }
      ](name='Images'),
    }(name='BizParams'),
    prompt?: string(name='Prompt'),
    requestId?: string(name='RequestId'),
    sessionId?: string(name='SessionId'),
  }(name='Input'),
  parameters?: {
    incrementalOutput?: boolean(name='Incremental_output'),
    vendorId?: string(name='vendorId'),
  }(name='Parameters'),
}

model BaiLianSseChatShrinkRequest {
  inputShrink?: string(name='Input'),
  parametersShrink?: string(name='Parameters'),
}

model BaiLianSseChatResponseBody = {
  code?: string(name='Code'),
  data?: {
    code?: string(name='Code'),
    message?: string(name='Message'),
    output?: {
      choices?: [ 
        {
          finishReason?: string(name='FinishReason'),
          message?: {
            content?: string(name='Content'),
            role?: string(name='Role'),
          }(name='Message'),
        }
      ](name='Choices'),
      sensitivePhraseHit?: boolean(name='SensitivePhraseHit'),
      text?: string(name='Text'),
      transition?: boolean(name='Transition'),
    }(name='Output'),
    requestId?: string(name='RequestId'),
    sessionId?: string(name='SessionId'),
  }(name='Data'),
  httpStatusCode?: string(name='HttpStatusCode'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: string(name='Success'),
}

model BaiLianSseChatResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BaiLianSseChatResponseBody(name='body'),
}

/**
 * @summary 百炼vqa
 *
 * @param tmpReq BaiLianSseChatRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return BaiLianSseChatResponse
 */
async function baiLianSseChatWithOptions(tmpReq: BaiLianSseChatRequest, headers: map[string]string, runtime: Util.RuntimeOptions): BaiLianSseChatResponse {
  Util.validateModel(tmpReq);
  var request = new BaiLianSseChatShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.input)) {
    request.inputShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.input, 'Input', 'json');
  }
  if (!Util.isUnset(tmpReq.parameters)) {
    request.parametersShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.parameters, 'Parameters', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.inputShrink)) {
    body['Input'] = request.inputShrink;
  }
  if (!Util.isUnset(request.parametersShrink)) {
    body['Parameters'] = request.parametersShrink;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'BaiLianSseChat',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/llm/sse/vqa`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 百炼vqa
 *
 * @param request BaiLianSseChatRequest
 * @return BaiLianSseChatResponse
 */
async function baiLianSseChat(request: BaiLianSseChatRequest): BaiLianSseChatResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return baiLianSseChatWithOptions(request, headers, runtime);
}

model BatchCreateShopRequest {
  country?: string(name='Country'),
  shopList?: [ 
    {
      businessStatus?: int32(name='BusinessStatus', example='1'),
      latitude?: string(name='Latitude', example='30.200714'),
      location?: string(name='Location'),
      longitude?: string(name='Longitude', example='120.20101'),
      regionAddress?: string(name='RegionAddress', example='330108'),
      regionCode?: string(name='RegionCode', example='2500'),
      remark?: string(name='Remark'),
      shopGroupIds?: [ string ](name='ShopGroupIds'),
      shopId?: string(name='ShopId', description='This parameter is required.', example='ShopId'),
      shopName?: string(name='ShopName', description='This parameter is required.'),
      weekdaysEndTime?: string(name='WeekdaysEndTime', example='17:00:00'),
      weekdaysStartTime?: string(name='WeekdaysStartTime', example='08:00:00'),
      weekendEndTime?: string(name='WeekendEndTime', example='18:00:00'),
      weekendStartTime?: string(name='WeekendStartTime', example='08:00:00'),
    }
  ](name='ShopList', description='This parameter is required.'),
}

model BatchCreateShopShrinkRequest {
  country?: string(name='Country'),
  shopListShrink?: string(name='ShopList', description='This parameter is required.'),
}

model BatchCreateShopResponseBody = {
  code?: string(name='Code', example='success'),
  data?: [ 
    {
      code?: string(name='Code', example='Code'),
      message?: string(name='Message', example='Message'),
      shopId?: string(name='ShopId', example='ShopId'),
    }
  ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='RequestId'),
  success?: boolean(name='Success', example='true'),
}

model BatchCreateShopResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchCreateShopResponseBody(name='body'),
}

/**
 * @summary 批量创建门店
 *
 * @param tmpReq BatchCreateShopRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchCreateShopResponse
 */
async function batchCreateShopWithOptions(tmpReq: BatchCreateShopRequest, headers: map[string]string, runtime: Util.RuntimeOptions): BatchCreateShopResponse {
  Util.validateModel(tmpReq);
  var request = new BatchCreateShopShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.shopList)) {
    request.shopListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.shopList, 'ShopList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.shopListShrink)) {
    body['ShopList'] = request.shopListShrink;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'BatchCreateShop',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/BatchCreateShop`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 批量创建门店
 *
 * @param request BatchCreateShopRequest
 * @return BatchCreateShopResponse
 */
async function batchCreateShop(request: BatchCreateShopRequest): BatchCreateShopResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return batchCreateShopWithOptions(request, headers, runtime);
}

model BatchCreateShopGroupRequest {
  country?: string(name='Country'),
  shopGroupList?: [ 
    {
      shopGroupId?: string(name='ShopGroupId', description='This parameter is required.', example='ShopGroupId'),
      shopGroupName?: string(name='ShopGroupName', description='This parameter is required.', example='ShopGroupName'),
    }
  ](name='ShopGroupList', description='This parameter is required.'),
}

model BatchCreateShopGroupShrinkRequest {
  country?: string(name='Country'),
  shopGroupListShrink?: string(name='ShopGroupList', description='This parameter is required.'),
}

model BatchCreateShopGroupResponseBody = {
  code?: string(name='Code', example='success'),
  data?: [ 
    {
      code?: string(name='Code', example='Code'),
      message?: string(name='Message', example='Message'),
      shopGroupId?: string(name='ShopGroupId', example='ShopGroupId'),
    }
  ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='RequestId'),
  success?: boolean(name='Success', example='true'),
}

model BatchCreateShopGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchCreateShopGroupResponseBody(name='body'),
}

/**
 * @summary 批量创建门店组
 *
 * @param tmpReq BatchCreateShopGroupRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchCreateShopGroupResponse
 */
async function batchCreateShopGroupWithOptions(tmpReq: BatchCreateShopGroupRequest, headers: map[string]string, runtime: Util.RuntimeOptions): BatchCreateShopGroupResponse {
  Util.validateModel(tmpReq);
  var request = new BatchCreateShopGroupShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.shopGroupList)) {
    request.shopGroupListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.shopGroupList, 'ShopGroupList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.shopGroupListShrink)) {
    body['ShopGroupList'] = request.shopGroupListShrink;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'BatchCreateShopGroup',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/BatchCreateShopGroup`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 批量创建门店组
 *
 * @param request BatchCreateShopGroupRequest
 * @return BatchCreateShopGroupResponse
 */
async function batchCreateShopGroup(request: BatchCreateShopGroupRequest): BatchCreateShopGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return batchCreateShopGroupWithOptions(request, headers, runtime);
}

model BatchGetStoreTextDataRequest {
  storeIds?: [ string ](name='StoreIds', description='This parameter is required.'),
  country?: string(name='country', example='CN'),
}

model BatchGetStoreTextDataShrinkRequest {
  storeIdsShrink?: string(name='StoreIds', description='This parameter is required.'),
  country?: string(name='country', example='CN'),
}

model BatchGetStoreTextDataResponseBody = {
  code?: string(name='Code', example='success'),
  data?: [ 
    {
      containers?: [ 
        {
          containerData?: [ 
            {
              bold?: int32(name='Bold', example='1'),
              color?: string(name='Color', example='#ff006e'),
              mark?: string(name='Mark'),
              subText?: string(name='SubText'),
              text?: string(name='Text'),
            }
          ](name='ContainerData'),
          title?: string(name='Title', example='AFTERNOON'),
          type?: string(name='Type', example='AFTERNOON'),
          visible?: int32(name='Visible', example='1'),
        }
      ](name='Containers'),
      storeId?: string(name='StoreId', example='s-pdwrrnkufn'),
    }
  ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='C94F7A6A-CE27-512D-BFEC-7A0D09B9F5AD'),
  success?: boolean(name='Success', example='true'),
}

model BatchGetStoreTextDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchGetStoreTextDataResponseBody(name='body'),
}

/**
 * @param tmpReq BatchGetStoreTextDataRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchGetStoreTextDataResponse
 */
async function batchGetStoreTextDataWithOptions(tmpReq: BatchGetStoreTextDataRequest, headers: map[string]string, runtime: Util.RuntimeOptions): BatchGetStoreTextDataResponse {
  Util.validateModel(tmpReq);
  var request = new BatchGetStoreTextDataShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.storeIds)) {
    request.storeIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.storeIds, 'StoreIds', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.storeIdsShrink)) {
    body['StoreIds'] = request.storeIdsShrink;
  }
  if (!Util.isUnset(request.country)) {
    body['country'] = request.country;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'BatchGetStoreTextData',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/BatchGetStoreTextData`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BatchGetStoreTextDataRequest
 * @return BatchGetStoreTextDataResponse
 */
async function batchGetStoreTextData(request: BatchGetStoreTextDataRequest): BatchGetStoreTextDataResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return batchGetStoreTextDataWithOptions(request, headers, runtime);
}

model BatchUpdateStoreTextDataRequest {
  storeTextData?: [ 
    {
      containers?: [ 
        {
          containerData?: [ 
            {
              bold?: int32(name='Bold', example='1'),
              color?: string(name='Color', example='#ff006e'),
              mark?: string(name='Mark'),
              subText?: string(name='SubText'),
              text?: string(name='Text'),
            }
          ](name='ContainerData'),
          title?: string(name='Title', description='This parameter is required.', example='TOP'),
          type?: string(name='Type', description='This parameter is required.', example='TOP'),
          visible?: int32(name='Visible', example='1'),
        }
      ](name='Containers', description='This parameter is required.'),
      storeId?: string(name='StoreId', description='This parameter is required.', example='shopcode'),
    }
  ](name='StoreTextData', description='This parameter is required.'),
  country?: string(name='country', example='CN'),
}

model BatchUpdateStoreTextDataShrinkRequest {
  storeTextDataShrink?: string(name='StoreTextData', description='This parameter is required.'),
  country?: string(name='country', example='CN'),
}

model BatchUpdateStoreTextDataResponseBody = {
  code?: string(name='Code', example='success'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='A60C309D-5631-13BB-8DA2-A9B3C5184FD9'),
  success?: boolean(name='Success', example='true'),
}

model BatchUpdateStoreTextDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchUpdateStoreTextDataResponseBody(name='body'),
}

/**
 * @param tmpReq BatchUpdateStoreTextDataRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchUpdateStoreTextDataResponse
 */
async function batchUpdateStoreTextDataWithOptions(tmpReq: BatchUpdateStoreTextDataRequest, headers: map[string]string, runtime: Util.RuntimeOptions): BatchUpdateStoreTextDataResponse {
  Util.validateModel(tmpReq);
  var request = new BatchUpdateStoreTextDataShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.storeTextData)) {
    request.storeTextDataShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.storeTextData, 'StoreTextData', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.storeTextDataShrink)) {
    body['StoreTextData'] = request.storeTextDataShrink;
  }
  if (!Util.isUnset(request.country)) {
    body['country'] = request.country;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'BatchUpdateStoreTextData',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/BatchUpdateStoreTextData`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BatchUpdateStoreTextDataRequest
 * @return BatchUpdateStoreTextDataResponse
 */
async function batchUpdateStoreTextData(request: BatchUpdateStoreTextDataRequest): BatchUpdateStoreTextDataResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return batchUpdateStoreTextDataWithOptions(request, headers, runtime);
}

model CreateLabelRequest {
  category?: string(name='Category', description='This parameter is required.', example='menu'),
  country?: string(name='Country'),
  label?: string(name='Label', description='This parameter is required.', example='MORNING'),
  title?: string(name='Title', description='This parameter is required.', example='示例标题'),
}

model CreateLabelResponseBody = {
  code?: string(name='Code', example='success'),
  data?: string(name='Data', example='abcdef'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='A60C309D-5631-13BB-8DA2-A9B3C5184FD9'),
  success?: boolean(name='Success', example='true'),
}

model CreateLabelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateLabelResponseBody(name='body'),
}

/**
 * @summary 创建标签
 *
 * @param request CreateLabelRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateLabelResponse
 */
async function createLabelWithOptions(request: CreateLabelRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateLabelResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.category)) {
    body['Category'] = request.category;
  }
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.label)) {
    body['Label'] = request.label;
  }
  if (!Util.isUnset(request.title)) {
    body['Title'] = request.title;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateLabel',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/CreateLabel`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 创建标签
 *
 * @param request CreateLabelRequest
 * @return CreateLabelResponse
 */
async function createLabel(request: CreateLabelRequest): CreateLabelResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return createLabelWithOptions(request, headers, runtime);
}

model CreateMenuDataRequest {
  batchId?: string(name='BatchId', example='batchId'),
  country?: string(name='Country'),
  priority?: int32(name='Priority', example='1'),
  productCombineList?: [ 
    {
      englishName?: string(name='EnglishName'),
      name?: string(name='Name'),
      order?: int32(name='Order', description='This parameter is required.', example='1'),
      productItemList?: [ 
        {
          order?: int32(name='Order', description='This parameter is required.', example='1'),
          productInfo?: {
            chineseName?: string(name='ChineseName', description='This parameter is required.'),
            currentPrice?: string(name='CurrentPrice', example='10'),
            description?: string(name='Description'),
            englishName?: string(name='EnglishName'),
            iconText?: string(name='IconText'),
            originalPrice?: string(name='OriginalPrice', example='12'),
            productId?: string(name='ProductId', description='This parameter is required.', example='productId'),
            productType?: string(name='ProductType'),
            temperature?: string(name='Temperature', example='normal'),
          }(name='ProductInfo', description='This parameter is required.'),
        }
      ](name='ProductItemList', description='This parameter is required.'),
    }
  ](name='ProductCombineList', description='This parameter is required.'),
  productContainerId?: string(name='ProductContainerId', description='This parameter is required.', example='productContainerId'),
  shopGroupId?: string(name='ShopGroupId', example='shopGroupid'),
  shopIdList?: [ string ](name='ShopIdList'),
  type?: string(name='Type', description='This parameter is required.', example='top'),
}

model CreateMenuDataShrinkRequest {
  batchId?: string(name='BatchId', example='batchId'),
  country?: string(name='Country'),
  priority?: int32(name='Priority', example='1'),
  productCombineListShrink?: string(name='ProductCombineList', description='This parameter is required.'),
  productContainerId?: string(name='ProductContainerId', description='This parameter is required.', example='productContainerId'),
  shopGroupId?: string(name='ShopGroupId', example='shopGroupid'),
  shopIdListShrink?: string(name='ShopIdList'),
  type?: string(name='Type', description='This parameter is required.', example='top'),
}

model CreateMenuDataResponseBody = {
  code?: string(name='Code', example='Success'),
  data?: string(name='Data', example='productContainerId'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='requestId'),
  success?: boolean(name='Success', example='true'),
}

model CreateMenuDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateMenuDataResponseBody(name='body'),
}

/**
 * @summary 创建菜单数据
 *
 * @param tmpReq CreateMenuDataRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateMenuDataResponse
 */
async function createMenuDataWithOptions(tmpReq: CreateMenuDataRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateMenuDataResponse {
  Util.validateModel(tmpReq);
  var request = new CreateMenuDataShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.productCombineList)) {
    request.productCombineListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.productCombineList, 'ProductCombineList', 'json');
  }
  if (!Util.isUnset(tmpReq.shopIdList)) {
    request.shopIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.shopIdList, 'ShopIdList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.batchId)) {
    body['BatchId'] = request.batchId;
  }
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.priority)) {
    body['Priority'] = request.priority;
  }
  if (!Util.isUnset(request.productCombineListShrink)) {
    body['ProductCombineList'] = request.productCombineListShrink;
  }
  if (!Util.isUnset(request.productContainerId)) {
    body['ProductContainerId'] = request.productContainerId;
  }
  if (!Util.isUnset(request.shopGroupId)) {
    body['ShopGroupId'] = request.shopGroupId;
  }
  if (!Util.isUnset(request.shopIdListShrink)) {
    body['ShopIdList'] = request.shopIdListShrink;
  }
  if (!Util.isUnset(request.type)) {
    body['Type'] = request.type;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateMenuData',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/CreateMenuData`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 创建菜单数据
 *
 * @param request CreateMenuDataRequest
 * @return CreateMenuDataResponse
 */
async function createMenuData(request: CreateMenuDataRequest): CreateMenuDataResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return createMenuDataWithOptions(request, headers, runtime);
}

model CreateShopRequest {
  country?: string(name='Country'),
  shopList?: [ 
    {
      businessStatus?: int32(name='BusinessStatus', example='1'),
      latitude?: string(name='Latitude', example='30.200714'),
      location?: string(name='Location'),
      longitude?: string(name='Longitude', example='120.20101'),
      regionAddress?: string(name='RegionAddress', example='330108'),
      regionCode?: string(name='RegionCode', example='2500'),
      remark?: string(name='Remark'),
      shopGroupIds?: [ string ](name='ShopGroupIds'),
      shopId?: string(name='ShopId', description='This parameter is required.', example='ShopId'),
      shopName?: string(name='ShopName', description='This parameter is required.'),
      weekdaysEndTime?: string(name='WeekdaysEndTime', example='17:00:00'),
      weekdaysStartTime?: string(name='WeekdaysStartTime', example='08:00:00'),
      weekendEndTime?: string(name='WeekendEndTime', example='18:00:00'),
      weekendStartTime?: string(name='WeekendStartTime', example='08:00:00'),
    }
  ](name='ShopList'),
}

model CreateShopShrinkRequest {
  country?: string(name='Country'),
  shopListShrink?: string(name='ShopList'),
}

model CreateShopResponseBody = {
  code?: string(name='Code', example='success'),
  data?: [ string ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='RequestId'),
  success?: boolean(name='Success', example='true'),
}

model CreateShopResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateShopResponseBody(name='body'),
}

/**
 * @summary 添加门店
 *
 * @param tmpReq CreateShopRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateShopResponse
 */
async function createShopWithOptions(tmpReq: CreateShopRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateShopResponse {
  Util.validateModel(tmpReq);
  var request = new CreateShopShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.shopList)) {
    request.shopListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.shopList, 'ShopList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.shopListShrink)) {
    body['ShopList'] = request.shopListShrink;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateShop',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/CreateShop`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 添加门店
 *
 * @param request CreateShopRequest
 * @return CreateShopResponse
 */
async function createShop(request: CreateShopRequest): CreateShopResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return createShopWithOptions(request, headers, runtime);
}

model CreateShopGroupRequest {
  country?: string(name='Country'),
  shopGroupList?: [ 
    {
      shopGroupId?: string(name='ShopGroupId', description='This parameter is required.', example='ShopGroupId'),
      shopGroupName?: string(name='ShopGroupName', description='This parameter is required.', example='ShopGroupName'),
    }
  ](name='ShopGroupList'),
}

model CreateShopGroupShrinkRequest {
  country?: string(name='Country'),
  shopGroupListShrink?: string(name='ShopGroupList'),
}

model CreateShopGroupResponseBody = {
  code?: string(name='Code', example='success'),
  data?: [ string ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='RequestId'),
  success?: boolean(name='Success', example='true'),
}

model CreateShopGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateShopGroupResponseBody(name='body'),
}

/**
 * @param tmpReq CreateShopGroupRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateShopGroupResponse
 */
async function createShopGroupWithOptions(tmpReq: CreateShopGroupRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateShopGroupResponse {
  Util.validateModel(tmpReq);
  var request = new CreateShopGroupShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.shopGroupList)) {
    request.shopGroupListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.shopGroupList, 'ShopGroupList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.shopGroupListShrink)) {
    body['ShopGroupList'] = request.shopGroupListShrink;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateShopGroup',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/CreateShopGroup`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request CreateShopGroupRequest
 * @return CreateShopGroupResponse
 */
async function createShopGroup(request: CreateShopGroupRequest): CreateShopGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return createShopGroupWithOptions(request, headers, runtime);
}

model CreateSpeechTemplateRequest {
  contents?: string(name='Contents', description='This parameter is required.'),
  type?: string(name='Type', description='This parameter is required.', example='marktest'),
  country?: string(name='country', example='CN'),
}

model CreateSpeechTemplateResponseBody = {
  code?: string(name='Code', example='success'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='A60C309D-5631-13BB-8DA2-A9B3C5184FD9'),
  success?: boolean(name='Success', example='true'),
}

model CreateSpeechTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateSpeechTemplateResponseBody(name='body'),
}

/**
 * @param request CreateSpeechTemplateRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateSpeechTemplateResponse
 */
async function createSpeechTemplateWithOptions(request: CreateSpeechTemplateRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateSpeechTemplateResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.contents)) {
    body['Contents'] = request.contents;
  }
  if (!Util.isUnset(request.type)) {
    body['Type'] = request.type;
  }
  if (!Util.isUnset(request.country)) {
    body['country'] = request.country;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateSpeechTemplate',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/CreateSpeechTemplate`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request CreateSpeechTemplateRequest
 * @return CreateSpeechTemplateResponse
 */
async function createSpeechTemplate(request: CreateSpeechTemplateRequest): CreateSpeechTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return createSpeechTemplateWithOptions(request, headers, runtime);
}

model DeleteLabelRequest {
  country?: string(name='Country'),
  labelId?: string(name='LabelId', description='This parameter is required.', example='abcdef'),
}

model DeleteLabelResponseBody = {
  code?: string(name='Code', example='success'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='A60C309D-5631-13BB-8DA2-A9B3C5184FD9'),
  success?: boolean(name='Success', example='true'),
}

model DeleteLabelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteLabelResponseBody(name='body'),
}

/**
 * @summary 删除标签
 *
 * @param request DeleteLabelRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteLabelResponse
 */
async function deleteLabelWithOptions(request: DeleteLabelRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteLabelResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.labelId)) {
    body['LabelId'] = request.labelId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLabel',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/DeleteLabel`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 删除标签
 *
 * @param request DeleteLabelRequest
 * @return DeleteLabelResponse
 */
async function deleteLabel(request: DeleteLabelRequest): DeleteLabelResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteLabelWithOptions(request, headers, runtime);
}

model DeleteProductImageRequest {
  country?: string(name='Country'),
  productCode?: string(name='ProductCode', example='productId'),
  productImageIds?: [ string ](name='ProductImageIds'),
}

model DeleteProductImageShrinkRequest {
  country?: string(name='Country'),
  productCode?: string(name='ProductCode', example='productId'),
  productImageIdsShrink?: string(name='ProductImageIds'),
}

model DeleteProductImageResponseBody = {
  code?: string(name='Code', example='success'),
  data?: string(name='Data', example='ShopGroupId'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='RequestId'),
  success?: boolean(name='Success', example='true'),
}

model DeleteProductImageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteProductImageResponseBody(name='body'),
}

/**
 * @param tmpReq DeleteProductImageRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteProductImageResponse
 */
async function deleteProductImageWithOptions(tmpReq: DeleteProductImageRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteProductImageResponse {
  Util.validateModel(tmpReq);
  var request = new DeleteProductImageShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.productImageIds)) {
    request.productImageIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.productImageIds, 'ProductImageIds', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.productCode)) {
    body['ProductCode'] = request.productCode;
  }
  if (!Util.isUnset(request.productImageIdsShrink)) {
    body['ProductImageIds'] = request.productImageIdsShrink;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteProductImage',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/DeleteProductImage`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DeleteProductImageRequest
 * @return DeleteProductImageResponse
 */
async function deleteProductImage(request: DeleteProductImageRequest): DeleteProductImageResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteProductImageWithOptions(request, headers, runtime);
}

model DeleteShopRequest {
  country?: string(name='Country'),
  shopId?: string(name='ShopId', description='This parameter is required.', example='ShopId'),
}

model DeleteShopResponseBody = {
  code?: string(name='Code', example='success'),
  data?: string(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='RequestId'),
  success?: boolean(name='Success', example='true'),
}

model DeleteShopResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteShopResponseBody(name='body'),
}

/**
 * @param request DeleteShopRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteShopResponse
 */
async function deleteShopWithOptions(request: DeleteShopRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteShopResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.shopId)) {
    body['ShopId'] = request.shopId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteShop',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/DeleteShop`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DeleteShopRequest
 * @return DeleteShopResponse
 */
async function deleteShop(request: DeleteShopRequest): DeleteShopResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteShopWithOptions(request, headers, runtime);
}

model DeleteShopGroupRequest {
  country?: string(name='Country'),
  shopGroupId?: string(name='ShopGroupId', description='This parameter is required.', example='ShopGroupId'),
}

model DeleteShopGroupResponseBody = {
  code?: string(name='Code', example='success'),
  data?: string(name='Data', example='ShopGroupId'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='RequestId'),
  success?: boolean(name='Success', example='true'),
}

model DeleteShopGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteShopGroupResponseBody(name='body'),
}

/**
 * @param request DeleteShopGroupRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteShopGroupResponse
 */
async function deleteShopGroupWithOptions(request: DeleteShopGroupRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteShopGroupResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.shopGroupId)) {
    body['ShopGroupId'] = request.shopGroupId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteShopGroup',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/DeleteShopGroup`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DeleteShopGroupRequest
 * @return DeleteShopGroupResponse
 */
async function deleteShopGroup(request: DeleteShopGroupRequest): DeleteShopGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteShopGroupWithOptions(request, headers, runtime);
}

model DeleteSpeechTemplateRequest {
  type?: string(name='Type', description='This parameter is required.', example='marktest'),
  country?: string(name='country', example='CN'),
}

model DeleteSpeechTemplateResponseBody = {
  code?: string(name='Code', example='Success'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='7601D06F-CC44-56FF-96BF-1CD6E073CAC3'),
  success?: boolean(name='Success', example='true'),
}

model DeleteSpeechTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteSpeechTemplateResponseBody(name='body'),
}

/**
 * @param request DeleteSpeechTemplateRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteSpeechTemplateResponse
 */
async function deleteSpeechTemplateWithOptions(request: DeleteSpeechTemplateRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteSpeechTemplateResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.type)) {
    body['Type'] = request.type;
  }
  if (!Util.isUnset(request.country)) {
    body['country'] = request.country;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteSpeechTemplate',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/DeleteSpeechTemplate`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DeleteSpeechTemplateRequest
 * @return DeleteSpeechTemplateResponse
 */
async function deleteSpeechTemplate(request: DeleteSpeechTemplateRequest): DeleteSpeechTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteSpeechTemplateWithOptions(request, headers, runtime);
}

model GetMenuDataStatusRequest {
  batchId?: string(name='BatchId', example='batchId'),
  country?: string(name='Country'),
  productContainerId?: string(name='ProductContainerId', example='productContainerId'),
}

model GetMenuDataStatusResponseBody = {
  batchId?: string(name='BatchId', example='batchId'),
  code?: string(name='Code', example='Success'),
  failed?: long(name='Failed', example='0'),
  failedProductContainerList?: [ string ](name='FailedProductContainerList'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  productContainerId?: string(name='ProductContainerId', example='productContainerId'),
  requestId?: string(name='RequestId', example='requestId'),
  success?: boolean(name='Success', example='true'),
  total?: long(name='Total', example='16'),
}

model GetMenuDataStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetMenuDataStatusResponseBody(name='body'),
}

/**
 * @summary 查询菜单数据状态
 *
 * @param request GetMenuDataStatusRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetMenuDataStatusResponse
 */
async function getMenuDataStatusWithOptions(request: GetMenuDataStatusRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetMenuDataStatusResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.batchId)) {
    body['BatchId'] = request.batchId;
  }
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.productContainerId)) {
    body['ProductContainerId'] = request.productContainerId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetMenuDataStatus',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/GetMenuDataStatus`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询菜单数据状态
 *
 * @param request GetMenuDataStatusRequest
 * @return GetMenuDataStatusResponse
 */
async function getMenuDataStatus(request: GetMenuDataStatusRequest): GetMenuDataStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getMenuDataStatusWithOptions(request, headers, runtime);
}

model GetShopRequest {
  country?: string(name='Country'),
  shopId?: string(name='ShopId', description='This parameter is required.', example='ShopId'),
}

model GetShopResponseBody = {
  businessStatus?: int32(name='BusinessStatus', example='1'),
  code?: string(name='Code', example='success'),
  deviceMacList?: [ string ](name='DeviceMacList'),
  deviceNum?: int32(name='DeviceNum', example='0'),
  gmtCreateTime?: long(name='GmtCreateTime', example='1640683984813'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  latitude?: string(name='Latitude', example='130.00'),
  location?: string(name='Location'),
  longitude?: string(name='Longitude', example='130.00'),
  message?: string(name='Message', example='success'),
  regionAddress?: string(name='RegionAddress'),
  regionCode?: string(name='RegionCode', example='330108'),
  remark?: string(name='Remark'),
  requestId?: string(name='RequestId', example='RequestId'),
  shopGroupIds?: [ string ](name='ShopGroupIds'),
  shopId?: string(name='ShopId', example='ShopId'),
  shopName?: string(name='ShopName', example='ShopName'),
  success?: boolean(name='Success', example='true'),
  weekdaysEndTime?: string(name='WeekdaysEndTime', example='17:00:00'),
  weekdaysStartTime?: string(name='WeekdaysStartTime', example='08:00:00'),
  weekendEndTime?: string(name='WeekendEndTime', example='18:00:00'),
  weekendStartTime?: string(name='WeekendStartTime', example='08:00:00'),
}

model GetShopResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetShopResponseBody(name='body'),
}

/**
 * @param request GetShopRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetShopResponse
 */
async function getShopWithOptions(request: GetShopRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetShopResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.shopId)) {
    body['ShopId'] = request.shopId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetShop',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/GetShop`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request GetShopRequest
 * @return GetShopResponse
 */
async function getShop(request: GetShopRequest): GetShopResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getShopWithOptions(request, headers, runtime);
}

model GetShopGroupRequest {
  country?: string(name='Country'),
  shopGroupId?: string(name='ShopGroupId', description='This parameter is required.', example='ShopGroupId'),
}

model GetShopGroupResponseBody = {
  code?: string(name='Code', example='success'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='RequestId'),
  shopGroupId?: string(name='ShopGroupId', example='ShopGroupId'),
  shopGroupName?: string(name='ShopGroupName', example='ShopGroupName'),
  success?: boolean(name='Success', example='true'),
}

model GetShopGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetShopGroupResponseBody(name='body'),
}

/**
 * @param request GetShopGroupRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetShopGroupResponse
 */
async function getShopGroupWithOptions(request: GetShopGroupRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetShopGroupResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.shopGroupId)) {
    body['ShopGroupId'] = request.shopGroupId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetShopGroup',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/GetShopGroup`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request GetShopGroupRequest
 * @return GetShopGroupResponse
 */
async function getShopGroup(request: GetShopGroupRequest): GetShopGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getShopGroupWithOptions(request, headers, runtime);
}

model GetSpeechTemplateRequest {
  type?: string(name='Type', description='This parameter is required.', example='marktest'),
  country?: string(name='country', example='CN'),
}

model GetSpeechTemplateResponseBody = {
  code?: string(name='Code', example='success'),
  data?: string(name='Data', example='[]'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='A60C309D-5631-13BB-8DA2-A9B3C5184FD9'),
  success?: boolean(name='Success', example='true'),
}

model GetSpeechTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetSpeechTemplateResponseBody(name='body'),
}

/**
 * @param request GetSpeechTemplateRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetSpeechTemplateResponse
 */
async function getSpeechTemplateWithOptions(request: GetSpeechTemplateRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetSpeechTemplateResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.type)) {
    body['Type'] = request.type;
  }
  if (!Util.isUnset(request.country)) {
    body['country'] = request.country;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetSpeechTemplate',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/GetSpeechTemplate`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request GetSpeechTemplateRequest
 * @return GetSpeechTemplateResponse
 */
async function getSpeechTemplate(request: GetSpeechTemplateRequest): GetSpeechTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getSpeechTemplateWithOptions(request, headers, runtime);
}

model ListMenuDataRequest {
  batchId?: string(name='BatchId', example='batchId'),
  country?: string(name='Country'),
  createRequestId?: string(name='CreateRequestId', example='createRequestId'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
  productContainerId?: string(name='ProductContainerId', example='productContainerId'),
}

model ListMenuDataResponseBody = {
  code?: string(name='Code', example='Success'),
  data?: [ 
    {
      batchId?: string(name='BatchId', example='batchId'),
      priority?: int32(name='Priority', example='1'),
      productCombineList?: [ 
        {
          name?: string(name='Name'),
          order?: int32(name='Order', example='1'),
          productItemList?: [ 
            {
              order?: int32(name='Order', example='1'),
              productInfo?: {
                chineseName?: string(name='ChineseName'),
                currentPrice?: string(name='CurrentPrice', example='10'),
                description?: string(name='Description'),
                englishName?: string(name='EnglishName'),
                iconText?: string(name='IconText'),
                originalPrice?: string(name='OriginalPrice', example='12'),
                productId?: string(name='ProductId', example='productId'),
                productType?: string(name='ProductType'),
                temperature?: string(name='Temperature', example='normal'),
              }(name='ProductInfo'),
            }
          ](name='ProductItemList'),
        }
      ](name='ProductCombineList'),
      productContainerId?: string(name='ProductContainerId', example='productContainerId'),
      shopGroupId?: string(name='ShopGroupId', example='shopGroupId'),
      shopIdList?: [ string ](name='ShopIdList'),
      type?: string(name='Type', example='top'),
    }
  ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='Success'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='requestId'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='120'),
}

model ListMenuDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListMenuDataResponseBody(name='body'),
}

/**
 * @summary 列举菜单数据
 *
 * @param request ListMenuDataRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListMenuDataResponse
 */
async function listMenuDataWithOptions(request: ListMenuDataRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListMenuDataResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.batchId)) {
    body['BatchId'] = request.batchId;
  }
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.createRequestId)) {
    body['CreateRequestId'] = request.createRequestId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.productContainerId)) {
    body['ProductContainerId'] = request.productContainerId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListMenuData',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/ListMenuData`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 列举菜单数据
 *
 * @param request ListMenuDataRequest
 * @return ListMenuDataResponse
 */
async function listMenuData(request: ListMenuDataRequest): ListMenuDataResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listMenuDataWithOptions(request, headers, runtime);
}

model ListShopRequest {
  country?: string(name='Country'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='50'),
  shopGroupIds?: [ string ](name='ShopGroupIds'),
  shopId?: string(name='ShopId', example='ShopId'),
  shopName?: string(name='ShopName', example='ShopName'),
}

model ListShopShrinkRequest {
  country?: string(name='Country'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='50'),
  shopGroupIdsShrink?: string(name='ShopGroupIds'),
  shopId?: string(name='ShopId', example='ShopId'),
  shopName?: string(name='ShopName', example='ShopName'),
}

model ListShopResponseBody = {
  code?: string(name='Code', example='success'),
  data?: [ 
    {
      businessStatus?: int32(name='BusinessStatus', example='1'),
      deviceMacList?: [ string ](name='DeviceMacList'),
      deviceNum?: int32(name='DeviceNum', example='0'),
      gmtCreateTime?: long(name='GmtCreateTime', example='1640741648999'),
      latitude?: string(name='Latitude', example='130.00'),
      location?: string(name='Location'),
      longitude?: string(name='Longitude', example='11.00'),
      regionAddress?: string(name='RegionAddress'),
      regionCode?: string(name='RegionCode', example='330108'),
      remark?: string(name='Remark'),
      shopGroupIds?: [ string ](name='ShopGroupIds'),
      shopId?: string(name='ShopId', example='ShopId'),
      shopName?: string(name='ShopName'),
      weekdaysEndTime?: string(name='WeekdaysEndTime', example='17:00:00'),
      weekdaysStartTime?: string(name='WeekdaysStartTime', example='08:00:00'),
      weekendEndTime?: string(name='WeekendEndTime', example='18:00:00'),
      weekendStartTime?: string(name='WeekendStartTime', example='08:00:00'),
    }
  ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='50'),
  requestId?: string(name='RequestId', example='RequestId'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='10'),
}

model ListShopResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListShopResponseBody(name='body'),
}

/**
 * @param tmpReq ListShopRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListShopResponse
 */
async function listShopWithOptions(tmpReq: ListShopRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListShopResponse {
  Util.validateModel(tmpReq);
  var request = new ListShopShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.shopGroupIds)) {
    request.shopGroupIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.shopGroupIds, 'ShopGroupIds', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.shopGroupIdsShrink)) {
    body['ShopGroupIds'] = request.shopGroupIdsShrink;
  }
  if (!Util.isUnset(request.shopId)) {
    body['ShopId'] = request.shopId;
  }
  if (!Util.isUnset(request.shopName)) {
    body['ShopName'] = request.shopName;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListShop',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/ListShop`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ListShopRequest
 * @return ListShopResponse
 */
async function listShop(request: ListShopRequest): ListShopResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listShopWithOptions(request, headers, runtime);
}

model ListShopGroupRequest {
  country?: string(name='Country'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='50'),
  shopGroupId?: string(name='ShopGroupId', example='ShopGroupId'),
  shopGroupName?: string(name='ShopGroupName', example='ShopGroupName'),
}

model ListShopGroupResponseBody = {
  code?: string(name='Code', example='success'),
  data?: [ 
    {
      shopGroupId?: string(name='ShopGroupId', example='ShopGroupId'),
      shopGroupName?: string(name='ShopGroupName', example='ShopGroupName'),
    }
  ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='50'),
  requestId?: string(name='RequestId', example='RequestId'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='TotalCount'),
}

model ListShopGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListShopGroupResponseBody(name='body'),
}

/**
 * @param request ListShopGroupRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListShopGroupResponse
 */
async function listShopGroupWithOptions(request: ListShopGroupRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListShopGroupResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.shopGroupId)) {
    body['ShopGroupId'] = request.shopGroupId;
  }
  if (!Util.isUnset(request.shopGroupName)) {
    body['ShopGroupName'] = request.shopGroupName;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListShopGroup',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/ListShopGroup`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ListShopGroupRequest
 * @return ListShopGroupResponse
 */
async function listShopGroup(request: ListShopGroupRequest): ListShopGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listShopGroupWithOptions(request, headers, runtime);
}

model PushStoreSpeechDataRequest {
  speech?: [ 
    {
      contents?: [ 
        {
          content?: string(name='Content', description='This parameter is required.', example='VIP8'),
          placeholder?: string(name='Placeholder', description='This parameter is required.', example='memberLevel'),
        }
      ](name='Contents'),
      speech?: boolean(name='Speech', example='ture'),
      speed?: string(name='Speed', example='1'),
      type?: string(name='Type', description='This parameter is required.', example='marktest'),
      voice?: string(name='Voice', example='xiaoyun'),
      volume?: int32(name='Volume', example='1'),
    }
  ](name='Speech', description='This parameter is required.'),
  storeId?: string(name='StoreId', description='This parameter is required.', example='shopcode'),
  country?: string(name='country', example='CN'),
}

model PushStoreSpeechDataShrinkRequest {
  speechShrink?: string(name='Speech', description='This parameter is required.'),
  storeId?: string(name='StoreId', description='This parameter is required.', example='shopcode'),
  country?: string(name='country', example='CN'),
}

model PushStoreSpeechDataResponseBody = {
  code?: string(name='Code', example='success'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='7601D06F-CC44-56FF-96BF-1CD6E073CAC3'),
  success?: boolean(name='Success', example='true'),
}

model PushStoreSpeechDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: PushStoreSpeechDataResponseBody(name='body'),
}

/**
 * @param tmpReq PushStoreSpeechDataRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return PushStoreSpeechDataResponse
 */
async function pushStoreSpeechDataWithOptions(tmpReq: PushStoreSpeechDataRequest, headers: map[string]string, runtime: Util.RuntimeOptions): PushStoreSpeechDataResponse {
  Util.validateModel(tmpReq);
  var request = new PushStoreSpeechDataShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.speech)) {
    request.speechShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.speech, 'Speech', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.speechShrink)) {
    body['Speech'] = request.speechShrink;
  }
  if (!Util.isUnset(request.storeId)) {
    body['StoreId'] = request.storeId;
  }
  if (!Util.isUnset(request.country)) {
    body['country'] = request.country;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'PushStoreSpeechData',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/PushStoreSpeechData`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request PushStoreSpeechDataRequest
 * @return PushStoreSpeechDataResponse
 */
async function pushStoreSpeechData(request: PushStoreSpeechDataRequest): PushStoreSpeechDataResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return pushStoreSpeechDataWithOptions(request, headers, runtime);
}

model QueryDeviceDataListRequest {
  deviceName?: string(name='DeviceName', example='BGTest04'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
}

model QueryDeviceDataListResponseBody = {
  code?: string(name='Code', example='success'),
  data?: [ 
    {
      appVersion?: string(name='AppVersion', example='1.0.0'),
      businessStatus?: string(name='BusinessStatus'),
      city?: string(name='City'),
      deviceGroupList?: string(name='DeviceGroupList'),
      deviceModel?: string(name='DeviceModel', example='B242'),
      deviceName?: string(name='DeviceName', example='rlmj-rjgy220623'),
      deviceSpecificModel?: string(name='DeviceSpecificModel', example='BG50D0NN'),
      deviceType?: string(name='DeviceType'),
      lastOnlineTime?: string(name='LastOnlineTime', example='2022/11/28  13:47:38'),
      mac?: string(name='Mac', example='AA:BB:77:88:99:02'),
      province?: string(name='Province'),
      region?: string(name='Region'),
      regionAddress?: string(name='RegionAddress'),
      shopId?: string(name='ShopId', example='shop_gucke4'),
      shopName?: string(name='ShopName'),
      sn?: string(name='Sn', description='SN', example='BCN221S21467B30'),
      status?: string(name='Status', example='online'),
    }
  ](name='Data', description='The returned data.'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='7601D06F-CC44-56FF-96BF-1CD6E073CAC3'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='10'),
}

model QueryDeviceDataListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryDeviceDataListResponseBody(name='body'),
}

/**
 * @param request QueryDeviceDataListRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryDeviceDataListResponse
 */
async function queryDeviceDataListWithOptions(request: QueryDeviceDataListRequest, headers: map[string]string, runtime: Util.RuntimeOptions): QueryDeviceDataListResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceName)) {
    body['DeviceName'] = request.deviceName;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryDeviceDataList',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/QueryDeviceDataList`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request QueryDeviceDataListRequest
 * @return QueryDeviceDataListResponse
 */
async function queryDeviceDataList(request: QueryDeviceDataListRequest): QueryDeviceDataListResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return queryDeviceDataListWithOptions(request, headers, runtime);
}

model QueryFaultBriefListRequest {
  shopIdList?: [ string ](name='ShopIdList'),
}

model QueryFaultBriefListShrinkRequest {
  shopIdListShrink?: string(name='ShopIdList'),
}

model QueryFaultBriefListResponseBody = {
  code?: string(name='Code', example='success'),
  data?: [ 
    {
      faultNum?: int32(name='FaultNum', example='100'),
      faultType?: int32(name='FaultType', example='0'),
      recoveryNum?: int32(name='RecoveryNum', example='99'),
    }
  ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='A60C309D-5631-13BB-8DA2-A9B3C5184FD9'),
  success?: boolean(name='Success', example='true'),
}

model QueryFaultBriefListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryFaultBriefListResponseBody(name='body'),
}

/**
 * @param tmpReq QueryFaultBriefListRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryFaultBriefListResponse
 */
async function queryFaultBriefListWithOptions(tmpReq: QueryFaultBriefListRequest, headers: map[string]string, runtime: Util.RuntimeOptions): QueryFaultBriefListResponse {
  Util.validateModel(tmpReq);
  var request = new QueryFaultBriefListShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.shopIdList)) {
    request.shopIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.shopIdList, 'ShopIdList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.shopIdListShrink)) {
    body['ShopIdList'] = request.shopIdListShrink;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryFaultBriefList',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/QueryFaultBriefList`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request QueryFaultBriefListRequest
 * @return QueryFaultBriefListResponse
 */
async function queryFaultBriefList(request: QueryFaultBriefListRequest): QueryFaultBriefListResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return queryFaultBriefListWithOptions(request, headers, runtime);
}

model QueryFaultDeviceListRequest {
  dailyOnlineTime?: int32(name='DailyOnlineTime', example='4'),
  endDate?: string(name='EndDate', example='1669564740999'),
  faultType?: string(name='FaultType', example='0'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
  shopIdList?: [ string ](name='ShopIdList'),
  startDate?: string(name='StartDate', example='1669478400000'),
}

model QueryFaultDeviceListShrinkRequest {
  dailyOnlineTime?: int32(name='DailyOnlineTime', example='4'),
  endDate?: string(name='EndDate', example='1669564740999'),
  faultType?: string(name='FaultType', example='0'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
  shopIdListShrink?: string(name='ShopIdList'),
  startDate?: string(name='StartDate', example='1669478400000'),
}

model QueryFaultDeviceListResponseBody = {
  code?: string(name='Code', example='success'),
  data?: [ 
    {
      belongShop?: string(name='BelongShop'),
      dailyOnlineTime?: string(name='DailyOnlineTime'),
      deviceName?: string(name='DeviceName', example='S03LFHGYR9J4GD6X'),
      faultNum?: int32(name='FaultNum', example='3'),
      lastOnlineTime?: string(name='LastOnlineTime', example='2022-09-01 16:00:49'),
      mac?: string(name='Mac', example='F8:8E:A1:7B:7C:D0'),
      status?: string(name='Status'),
      ticketNum?: string(name='TicketNum', example='T010-1668156851006-hATC'),
      version?: string(name='Version', example='1.0.53.2'),
    }
  ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='7601D06F-CC44-56FF-96BF-1CD6E073CAC3'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='20'),
}

model QueryFaultDeviceListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryFaultDeviceListResponseBody(name='body'),
}

/**
 * @param tmpReq QueryFaultDeviceListRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryFaultDeviceListResponse
 */
async function queryFaultDeviceListWithOptions(tmpReq: QueryFaultDeviceListRequest, headers: map[string]string, runtime: Util.RuntimeOptions): QueryFaultDeviceListResponse {
  Util.validateModel(tmpReq);
  var request = new QueryFaultDeviceListShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.shopIdList)) {
    request.shopIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.shopIdList, 'ShopIdList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.dailyOnlineTime)) {
    body['DailyOnlineTime'] = request.dailyOnlineTime;
  }
  if (!Util.isUnset(request.endDate)) {
    body['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.faultType)) {
    body['FaultType'] = request.faultType;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.shopIdListShrink)) {
    body['ShopIdList'] = request.shopIdListShrink;
  }
  if (!Util.isUnset(request.startDate)) {
    body['StartDate'] = request.startDate;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryFaultDeviceList',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/QueryFaultDeviceList`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request QueryFaultDeviceListRequest
 * @return QueryFaultDeviceListResponse
 */
async function queryFaultDeviceList(request: QueryFaultDeviceListRequest): QueryFaultDeviceListResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return queryFaultDeviceListWithOptions(request, headers, runtime);
}

model QueryLabelRequest {
  category?: string(name='Category', description='This parameter is required.', example='menu'),
  country?: string(name='Country'),
  label?: string(name='Label', example='testlabal'),
  labelId?: string(name='LabelId', example='testlabel'),
  pageNo?: int32(name='PageNo', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  title?: string(name='Title', example='title'),
}

model QueryLabelResponseBody = {
  code?: string(name='Code', example='success'),
  data?: [ 
    {
      category?: string(name='Category', example='menu'),
      label?: string(name='Label', example='testlabel'),
      labelId?: string(name='LabelId', example='abcdef'),
      title?: string(name='Title'),
    }
  ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  pageNo?: int32(name='PageNo', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='A60C309D-5631-13BB-8DA2-A9B3C5184FD9'),
  success?: boolean(name='Success', example='true'),
  total?: int32(name='Total', example='1'),
}

model QueryLabelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryLabelResponseBody(name='body'),
}

/**
 * @summary 查询标签
 *
 * @param request QueryLabelRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryLabelResponse
 */
async function queryLabelWithOptions(request: QueryLabelRequest, headers: map[string]string, runtime: Util.RuntimeOptions): QueryLabelResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.category)) {
    body['Category'] = request.category;
  }
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.label)) {
    body['Label'] = request.label;
  }
  if (!Util.isUnset(request.labelId)) {
    body['LabelId'] = request.labelId;
  }
  if (!Util.isUnset(request.pageNo)) {
    body['PageNo'] = request.pageNo;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.title)) {
    body['Title'] = request.title;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryLabel',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/QueryLabel`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询标签
 *
 * @param request QueryLabelRequest
 * @return QueryLabelResponse
 */
async function queryLabel(request: QueryLabelRequest): QueryLabelResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return queryLabelWithOptions(request, headers, runtime);
}

model QueryOperationIndexRequest {
  country?: string(name='Country'),
  endDate?: string(name='EndDate'),
  shopIdList?: [ string ](name='ShopIdList'),
  startDate?: string(name='StartDate'),
}

model QueryOperationIndexShrinkRequest {
  country?: string(name='Country'),
  endDate?: string(name='EndDate'),
  shopIdListShrink?: string(name='ShopIdList'),
  startDate?: string(name='StartDate'),
}

model QueryOperationIndexResponseBody = {
  code?: string(name='Code', example='success'),
  data?: {
    deviceIndex?: {
      cpuAverage?: int32(name='CpuAverage', example='25%'),
      faultDeviceNum?: int32(name='FaultDeviceNum', example='12'),
      highFreqFaultDeviceNum?: int32(name='HighFreqFaultDeviceNum', example='8'),
      networkTraffic?: int32(name='NetworkTraffic', example='540'),
      normalDeviceNum?: int32(name='NormalDeviceNum', example='1500'),
      onlineNum?: int32(name='OnlineNum', example='2034'),
      storageAverage?: int32(name='StorageAverage', example='45%'),
      totalWorkingDeviceNum?: int32(name='TotalWorkingDeviceNum', example='1800'),
    }(name='DeviceIndex'),
    shopIndex?: {
      faultShopNum?: int32(name='FaultShopNum', example='320'),
      highFreqFaultShopNum?: int32(name='HighFreqFaultShopNum', example='12'),
      installedShopNum?: int32(name='InstalledShopNum', example='10001'),
      netWorkShopNum?: int32(name='NetWorkShopNum', example='10010'),
      normalShopNum?: int32(name='NormalShopNum', example='10020'),
      notWorkShopNum?: int32(name='NotWorkShopNum', example='37'),
      shopTotal?: int32(name='ShopTotal', example='10310'),
      upholdShopNum?: int32(name='UpholdShopNum', example='238'),
    }(name='ShopIndex'),
    ticketIndex?: {
      autoRecoverRate?: double(name='AutoRecoverRate', example='90%'),
      autoRecoverTicketNum?: int32(name='AutoRecoverTicketNum', example='800'),
      openTicketNum?: int32(name='OpenTicketNum', example='100'),
      recoverRate?: double(name='RecoverRate', example='80%'),
      totalTicketNum?: int32(name='TotalTicketNum', example='1000'),
    }(name='TicketIndex'),
  }(name='Data', description='The returned data.'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='B97A58B6-57AA-5CCF-9A94-52BB7BC47BC1'),
  success?: boolean(name='Success', example='true'),
}

model QueryOperationIndexResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryOperationIndexResponseBody(name='body'),
}

/**
 * @param tmpReq QueryOperationIndexRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryOperationIndexResponse
 */
async function queryOperationIndexWithOptions(tmpReq: QueryOperationIndexRequest, headers: map[string]string, runtime: Util.RuntimeOptions): QueryOperationIndexResponse {
  Util.validateModel(tmpReq);
  var request = new QueryOperationIndexShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.shopIdList)) {
    request.shopIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.shopIdList, 'ShopIdList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.endDate)) {
    body['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.shopIdListShrink)) {
    body['ShopIdList'] = request.shopIdListShrink;
  }
  if (!Util.isUnset(request.startDate)) {
    body['StartDate'] = request.startDate;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryOperationIndex',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/QueryOperationIndex`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request QueryOperationIndexRequest
 * @return QueryOperationIndexResponse
 */
async function queryOperationIndex(request: QueryOperationIndexRequest): QueryOperationIndexResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return queryOperationIndexWithOptions(request, headers, runtime);
}

model QueryShopIndexRequest {
  country?: string(name='Country'),
  shopIdList?: [ string ](name='ShopIdList'),
}

model QueryShopIndexShrinkRequest {
  country?: string(name='Country'),
  shopIdListShrink?: string(name='ShopIdList'),
}

model QueryShopIndexResponseBody = {
  code?: string(name='Code', example='success'),
  data?: {
    shopIndex?: {
      faultShopNum?: int32(name='FaultShopNum', example='210'),
      highFreqFaultShopNum?: int32(name='HighFreqFaultShopNum', example='12'),
      installedShopNum?: int32(name='InstalledShopNum', example='9801'),
      netWorkShopNum?: int32(name='NetWorkShopNum', example='890'),
      normalShopNum?: int32(name='NormalShopNum', example='10201'),
      notWorkShopNum?: int32(name='NotWorkShopNum', example='780'),
      shopTotal?: int32(name='ShopTotal', example='10310'),
      upholdShopNum?: int32(name='UpholdShopNum', example='560'),
    }(name='ShopIndex'),
    shopScheduleIndex?: {
      costTime?: double(name='CostTime', example='362'),
      failShopNum?: int32(name='FailShopNum', example='9'),
      failShops?: [ 
        {
          shopId?: string(name='ShopId'),
          shopName?: string(name='ShopName'),
        }
      ](name='FailShops'),
      scheduleNum?: int32(name='ScheduleNum', example='7810'),
      scheduleShopNum?: int32(name='ScheduleShopNum', example='2800'),
      successRate?: float(name='SuccessRate', example='92.89%'),
    }(name='ShopScheduleIndex'),
  }(name='Data', description='The returned data.'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='1B0723A1-9B6B-57D5-A2D4-AA7E56F04E3D'),
  success?: boolean(name='Success', example='true'),
}

model QueryShopIndexResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryShopIndexResponseBody(name='body'),
}

/**
 * @param tmpReq QueryShopIndexRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryShopIndexResponse
 */
async function queryShopIndexWithOptions(tmpReq: QueryShopIndexRequest, headers: map[string]string, runtime: Util.RuntimeOptions): QueryShopIndexResponse {
  Util.validateModel(tmpReq);
  var request = new QueryShopIndexShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.shopIdList)) {
    request.shopIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.shopIdList, 'ShopIdList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.shopIdListShrink)) {
    body['ShopIdList'] = request.shopIdListShrink;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryShopIndex',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/QueryShopIndex`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request QueryShopIndexRequest
 * @return QueryShopIndexResponse
 */
async function queryShopIndex(request: QueryShopIndexRequest): QueryShopIndexResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return queryShopIndexWithOptions(request, headers, runtime);
}

model QueryTicketListRequest {
  country?: string(name='Country'),
  endTime?: long(name='EndTime', example='1656058665064'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
  shopIdList?: [ string ](name='ShopIdList'),
  startTime?: long(name='StartTime', example='1656058565064'),
  status?: int32(name='Status', example='0'),
  ticketIdList?: [ string ](name='TicketIdList'),
  ticketTypeList?: [ string ](name='TicketTypeList'),
}

model QueryTicketListShrinkRequest {
  country?: string(name='Country'),
  endTime?: long(name='EndTime', example='1656058665064'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
  shopIdListShrink?: string(name='ShopIdList'),
  startTime?: long(name='StartTime', example='1656058565064'),
  status?: int32(name='Status', example='0'),
  ticketIdListShrink?: string(name='TicketIdList'),
  ticketTypeListShrink?: string(name='TicketTypeList'),
}

model QueryTicketListResponseBody = {
  code?: string(name='Code', example='200'),
  data?: [ 
    {
      deviceAlias?: string(name='DeviceAlias', example='deviceAlias'),
      deviceSn?: string(name='DeviceSn', example='deviceSn'),
      shopId?: string(name='ShopId', example='shopId'),
      shopName?: string(name='ShopName', example='shopName'),
      status?: int32(name='Status', example='1'),
      submitDate?: long(name='SubmitDate', example='1656058665064'),
      ticketId?: string(name='TicketId', example='ticketId'),
      ticketType?: string(name='TicketType', example='ticketType'),
      updateDate?: long(name='UpdateDate'),
    }
  ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='requestId'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='20'),
}

model QueryTicketListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryTicketListResponseBody(name='body'),
}

/**
 * @param tmpReq QueryTicketListRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryTicketListResponse
 */
async function queryTicketListWithOptions(tmpReq: QueryTicketListRequest, headers: map[string]string, runtime: Util.RuntimeOptions): QueryTicketListResponse {
  Util.validateModel(tmpReq);
  var request = new QueryTicketListShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.shopIdList)) {
    request.shopIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.shopIdList, 'ShopIdList', 'json');
  }
  if (!Util.isUnset(tmpReq.ticketIdList)) {
    request.ticketIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.ticketIdList, 'TicketIdList', 'json');
  }
  if (!Util.isUnset(tmpReq.ticketTypeList)) {
    request.ticketTypeListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.ticketTypeList, 'TicketTypeList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.shopIdListShrink)) {
    body['ShopIdList'] = request.shopIdListShrink;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.status)) {
    body['Status'] = request.status;
  }
  if (!Util.isUnset(request.ticketIdListShrink)) {
    body['TicketIdList'] = request.ticketIdListShrink;
  }
  if (!Util.isUnset(request.ticketTypeListShrink)) {
    body['TicketTypeList'] = request.ticketTypeListShrink;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryTicketList',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/QueryTicketList`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request QueryTicketListRequest
 * @return QueryTicketListResponse
 */
async function queryTicketList(request: QueryTicketListRequest): QueryTicketListResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return queryTicketListWithOptions(request, headers, runtime);
}

model RemoveShopFromGroupRequest {
  shopGroupId?: string(name='ShopGroupId', description='This parameter is required.', example='ShopGroupId'),
  shopIdList?: [ string ](name='ShopIdList'),
}

model RemoveShopFromGroupShrinkRequest {
  shopGroupId?: string(name='ShopGroupId', description='This parameter is required.', example='ShopGroupId'),
  shopIdListShrink?: string(name='ShopIdList'),
}

model RemoveShopFromGroupResponseBody = {
  code?: string(name='Code', example='success'),
  data?: string(name='Data', example='ShopGroupId'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='RequestId'),
  success?: boolean(name='Success', example='true'),
}

model RemoveShopFromGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveShopFromGroupResponseBody(name='body'),
}

/**
 * @summary 门店组移除门店
 *
 * @param tmpReq RemoveShopFromGroupRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveShopFromGroupResponse
 */
async function removeShopFromGroupWithOptions(tmpReq: RemoveShopFromGroupRequest, headers: map[string]string, runtime: Util.RuntimeOptions): RemoveShopFromGroupResponse {
  Util.validateModel(tmpReq);
  var request = new RemoveShopFromGroupShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.shopIdList)) {
    request.shopIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.shopIdList, 'ShopIdList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.shopGroupId)) {
    body['ShopGroupId'] = request.shopGroupId;
  }
  if (!Util.isUnset(request.shopIdListShrink)) {
    body['ShopIdList'] = request.shopIdListShrink;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RemoveShopFromGroup',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/RemoveShopFromGroup`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 门店组移除门店
 *
 * @param request RemoveShopFromGroupRequest
 * @return RemoveShopFromGroupResponse
 */
async function removeShopFromGroup(request: RemoveShopFromGroupRequest): RemoveShopFromGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return removeShopFromGroupWithOptions(request, headers, runtime);
}

model RemoveShopsFromGroupRequest {
  country?: string(name='Country'),
  shopGroupId?: string(name='ShopGroupId', description='This parameter is required.', example='ShopGroupId'),
  shopIdList?: [ string ](name='ShopIdList', description='This parameter is required.'),
}

model RemoveShopsFromGroupShrinkRequest {
  country?: string(name='Country'),
  shopGroupId?: string(name='ShopGroupId', description='This parameter is required.', example='ShopGroupId'),
  shopIdListShrink?: string(name='ShopIdList', description='This parameter is required.'),
}

model RemoveShopsFromGroupResponseBody = {
  code?: string(name='Code', example='success'),
  data?: [ 
    {
      code?: string(name='Code', example='Code'),
      message?: string(name='Message', example='Message'),
      shopId?: string(name='ShopId', example='ShopId'),
    }
  ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='RequestId'),
  success?: boolean(name='Success', example='true'),
}

model RemoveShopsFromGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveShopsFromGroupResponseBody(name='body'),
}

/**
 * @summary 门店组移除门店
 *
 * @param tmpReq RemoveShopsFromGroupRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveShopsFromGroupResponse
 */
async function removeShopsFromGroupWithOptions(tmpReq: RemoveShopsFromGroupRequest, headers: map[string]string, runtime: Util.RuntimeOptions): RemoveShopsFromGroupResponse {
  Util.validateModel(tmpReq);
  var request = new RemoveShopsFromGroupShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.shopIdList)) {
    request.shopIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.shopIdList, 'ShopIdList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.shopGroupId)) {
    body['ShopGroupId'] = request.shopGroupId;
  }
  if (!Util.isUnset(request.shopIdListShrink)) {
    body['ShopIdList'] = request.shopIdListShrink;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RemoveShopsFromGroup',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/RemoveShopsFromGroup`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 门店组移除门店
 *
 * @param request RemoveShopsFromGroupRequest
 * @return RemoveShopsFromGroupResponse
 */
async function removeShopsFromGroup(request: RemoveShopsFromGroupRequest): RemoveShopsFromGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return removeShopsFromGroupWithOptions(request, headers, runtime);
}

model UpdateLabelRequest {
  country?: string(name='Country'),
  label?: string(name='Label', example='test'),
  labelId?: string(name='LabelId', description='This parameter is required.', example='abcdef123'),
  title?: string(name='Title', description='This parameter is required.', example='title'),
}

model UpdateLabelResponseBody = {
  code?: string(name='Code', example='success'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='A60C309D-5631-13BB-8DA2-A9B3C5184FD9'),
  success?: boolean(name='Success', example='true'),
}

model UpdateLabelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateLabelResponseBody(name='body'),
}

/**
 * @summary 更新标签
 *
 * @param request UpdateLabelRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateLabelResponse
 */
async function updateLabelWithOptions(request: UpdateLabelRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateLabelResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.label)) {
    body['Label'] = request.label;
  }
  if (!Util.isUnset(request.labelId)) {
    body['LabelId'] = request.labelId;
  }
  if (!Util.isUnset(request.title)) {
    body['Title'] = request.title;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateLabel',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/UpdateLabel`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 更新标签
 *
 * @param request UpdateLabelRequest
 * @return UpdateLabelResponse
 */
async function updateLabel(request: UpdateLabelRequest): UpdateLabelResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateLabelWithOptions(request, headers, runtime);
}

model UpdateShopRequest {
  businessStatus?: int32(name='BusinessStatus', example='1'),
  country?: string(name='Country'),
  latitude?: string(name='Latitude', example='30.200714'),
  location?: string(name='Location'),
  longitude?: string(name='Longitude', example='120.20101'),
  regionAddress?: string(name='RegionAddress'),
  regionCode?: string(name='RegionCode', example='330108'),
  remark?: string(name='Remark'),
  shopGroupIds?: [ string ](name='ShopGroupIds'),
  shopId?: string(name='ShopId', description='This parameter is required.', example='ShopId'),
  shopName?: string(name='ShopName', description='This parameter is required.'),
  weekdaysEndTime?: string(name='WeekdaysEndTime', example='17:00:00'),
  weekdaysStartTime?: string(name='WeekdaysStartTime', example='08:00:00'),
  weekendEndTime?: string(name='WeekendEndTime', example='18:00:00'),
  weekendStartTime?: string(name='WeekendStartTime', example='08:00:00'),
}

model UpdateShopShrinkRequest {
  businessStatus?: int32(name='BusinessStatus', example='1'),
  country?: string(name='Country'),
  latitude?: string(name='Latitude', example='30.200714'),
  location?: string(name='Location'),
  longitude?: string(name='Longitude', example='120.20101'),
  regionAddress?: string(name='RegionAddress'),
  regionCode?: string(name='RegionCode', example='330108'),
  remark?: string(name='Remark'),
  shopGroupIdsShrink?: string(name='ShopGroupIds'),
  shopId?: string(name='ShopId', description='This parameter is required.', example='ShopId'),
  shopName?: string(name='ShopName', description='This parameter is required.'),
  weekdaysEndTime?: string(name='WeekdaysEndTime', example='17:00:00'),
  weekdaysStartTime?: string(name='WeekdaysStartTime', example='08:00:00'),
  weekendEndTime?: string(name='WeekendEndTime', example='18:00:00'),
  weekendStartTime?: string(name='WeekendStartTime', example='08:00:00'),
}

model UpdateShopResponseBody = {
  code?: string(name='Code', example='success'),
  data?: string(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='RequestId'),
  success?: boolean(name='Success', example='true'),
}

model UpdateShopResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateShopResponseBody(name='body'),
}

/**
 * @param tmpReq UpdateShopRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateShopResponse
 */
async function updateShopWithOptions(tmpReq: UpdateShopRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateShopResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateShopShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.shopGroupIds)) {
    request.shopGroupIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.shopGroupIds, 'ShopGroupIds', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.businessStatus)) {
    body['BusinessStatus'] = request.businessStatus;
  }
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.latitude)) {
    body['Latitude'] = request.latitude;
  }
  if (!Util.isUnset(request.location)) {
    body['Location'] = request.location;
  }
  if (!Util.isUnset(request.longitude)) {
    body['Longitude'] = request.longitude;
  }
  if (!Util.isUnset(request.regionAddress)) {
    body['RegionAddress'] = request.regionAddress;
  }
  if (!Util.isUnset(request.regionCode)) {
    body['RegionCode'] = request.regionCode;
  }
  if (!Util.isUnset(request.remark)) {
    body['Remark'] = request.remark;
  }
  if (!Util.isUnset(request.shopGroupIdsShrink)) {
    body['ShopGroupIds'] = request.shopGroupIdsShrink;
  }
  if (!Util.isUnset(request.shopId)) {
    body['ShopId'] = request.shopId;
  }
  if (!Util.isUnset(request.shopName)) {
    body['ShopName'] = request.shopName;
  }
  if (!Util.isUnset(request.weekdaysEndTime)) {
    body['WeekdaysEndTime'] = request.weekdaysEndTime;
  }
  if (!Util.isUnset(request.weekdaysStartTime)) {
    body['WeekdaysStartTime'] = request.weekdaysStartTime;
  }
  if (!Util.isUnset(request.weekendEndTime)) {
    body['WeekendEndTime'] = request.weekendEndTime;
  }
  if (!Util.isUnset(request.weekendStartTime)) {
    body['WeekendStartTime'] = request.weekendStartTime;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateShop',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/UpdateShop`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request UpdateShopRequest
 * @return UpdateShopResponse
 */
async function updateShop(request: UpdateShopRequest): UpdateShopResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateShopWithOptions(request, headers, runtime);
}

model UpdateShopGroupRequest {
  country?: string(name='Country'),
  shopGroupId?: string(name='ShopGroupId', description='This parameter is required.', example='ShopGroupId'),
  shopGroupName?: string(name='ShopGroupName', description='This parameter is required.', example='ShopGroupName'),
}

model UpdateShopGroupResponseBody = {
  code?: string(name='Code', example='success'),
  data?: string(name='Data', example='ShopGroupId'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='RequestId'),
  success?: boolean(name='Success', example='true'),
}

model UpdateShopGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateShopGroupResponseBody(name='body'),
}

/**
 * @param request UpdateShopGroupRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateShopGroupResponse
 */
async function updateShopGroupWithOptions(request: UpdateShopGroupRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateShopGroupResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.shopGroupId)) {
    body['ShopGroupId'] = request.shopGroupId;
  }
  if (!Util.isUnset(request.shopGroupName)) {
    body['ShopGroupName'] = request.shopGroupName;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateShopGroup',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/UpdateShopGroup`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request UpdateShopGroupRequest
 * @return UpdateShopGroupResponse
 */
async function updateShopGroup(request: UpdateShopGroupRequest): UpdateShopGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateShopGroupWithOptions(request, headers, runtime);
}

model UpdateSpeechTemplateRequest {
  contents?: string(name='Contents', description='This parameter is required.'),
  type?: string(name='Type', description='This parameter is required.', example='marktest'),
  country?: string(name='country', example='CN'),
}

model UpdateSpeechTemplateResponseBody = {
  code?: string(name='Code', example='success'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='7601D06F-CC44-56FF-96BF-1CD6E073CAC3'),
  success?: boolean(name='Success', example='true'),
}

model UpdateSpeechTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateSpeechTemplateResponseBody(name='body'),
}

/**
 * @param request UpdateSpeechTemplateRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateSpeechTemplateResponse
 */
async function updateSpeechTemplateWithOptions(request: UpdateSpeechTemplateRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateSpeechTemplateResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.contents)) {
    body['Contents'] = request.contents;
  }
  if (!Util.isUnset(request.type)) {
    body['Type'] = request.type;
  }
  if (!Util.isUnset(request.country)) {
    body['country'] = request.country;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateSpeechTemplate',
    version = '2021-12-7',
    protocol = 'HTTPS',
    pathname = `/UpdateSpeechTemplate`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request UpdateSpeechTemplateRequest
 * @return UpdateSpeechTemplateResponse
 */
async function updateSpeechTemplate(request: UpdateSpeechTemplateRequest): UpdateSpeechTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateSpeechTemplateWithOptions(request, headers, runtime);
}

